package pub.wkq.interfaces;

import java.util.Date;

public class Employee implements Cloneable{
    private String name;
    private double salary;
    private Date hireData;

    public Employee() {
    }

    public Employee(String name, double salary) {
        this.name = name;
        this.salary = salary;
    }

    public String getName() {
        return name;
    }

    public double getSalary() {
        return salary;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public void raiseSalary(int i) {

    }

    @Override
    protected Employee clone() throws CloneNotSupportedException {
        Employee cloned = (Employee) super.clone();
        //clone mutable fields
        cloned.hireData = (Date) hireData.clone();
        return cloned;
    }
}
